package com.ycl.plus.lm.hardware.domain.bo;

import com.ycl.plus.lm.hardware.domain.HardwareSensor;
import com.ycl.plus.lm.common.mybatis.core.domain.BaseEntity;
import com.ycl.plus.lm.common.core.validate.AddGroup;
import com.ycl.plus.lm.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.util.List;

/**
 * 传感器业务对象 hardware_sensor
 *
 * @author devil-ycl
 * @date 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HardwareSensor.class, reverseConvertGenerate = false)
public class HardwareSensorBo extends BaseEntity {

    /**
     * id
     */
    private Long id;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 父id
     */
    @NotNull(message = "父id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentId;

    /**
     * 传感器类型
     */
    @NotBlank(message = "传感器类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { EditGroup.class })
    private String status;


}
